import 'eventable.dart';
import 'focus.dart';
import 'world.dart';
import 'close_event.dart';

class OpenBagEvent extends Eventable {
  OpenBagEvent() : super('背包(b)') {
    this.code = 'b';
  }
  
  @override
  void doEvent(owner) {
    var overlay = Focus();
    overlay.point = World.instance.hero.bag;
    Focus.instance.overlays.add(overlay);
    World.instance.add(CloseEvent());
  }
}